﻿Public Class nhanvien
    Private _HoTen As String
    Private _NgaySinh As Date
    Private _LuongCoBan As Double
    Private _SoNgayCong As Integer


    Public Property HoTen() As String
        Get
            Return _HoTen
        End Get
        Set(ByVal value As String)
            _HoTen = value
        End Set
    End Property



    Public Property NgaySinh() As Date
        Get
            Return _NgaySinh
        End Get
        Set(ByVal value As Date)
            _NgaySinh = value
        End Set
    End Property



    Public Property LuongCoBan() As Double
        Get
            Return _LuongCoBan
        End Get
        Set(ByVal value As Double)
            _LuongCoBan = value
        End Set
    End Property

    Public Property SoNgayCong() As Integer
        Get
            Return _SoNgayCong
        End Get
        Set(ByVal value As Integer)
            _SoNgayCong = value
        End Set
    End Property

    Public Overridable Sub Nhap()
        Console.Write("Nhap ho ten:")
        _HoTen = Console.ReadLine()

        Console.Write("Nhap ngay sinh:")
        _NgaySinh = Convert.ToDateTime(Console.ReadLine())

        Console.Write("Nhap luong co ban:")
        _LuongCoBan = Convert.ToDouble(Console.ReadLine())
    End Sub

    Public Overridable Sub Xuat()
        Console.WriteLine("Ho ten:{0}", _HoTen)
        Console.WriteLine("Ngay sinh:{0}", _NgaySinh)
        Console.WriteLine("Luong co ban:{0}", _LuongCoBan)
    End Sub

    Public Overridable Function TinhLuong(ByVal sonc As Integer) As Double
        Return _LuongCoBan * sonc
    End Function
End Class
